home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8346 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.tau.ac.il!usenet
  2. From: "Eran Globen (limbo)" <besther@halo.tau.ac.il>
  3. Newsgroups: comp.lang.c
  4. Subject: free() wont free
  5. Date: Sun, 03 Mar 1996 15:16:21 +0300
  6. Organization: limbo
  7. Message-ID: <31398D95.5701DCB4@halo.tau.ac.il>
  8. NNTP-Posting-Host: slip-109.tau.ac.il
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (X11; I; Linux 1.3.25 i486)
  13.  
  14. Hi,
  15. i got a problem with memory allocation, or rather deallocation.
  16. i malloc() a linked list inside some function, use it i some other
  17. functions and try to free() it using another funtion (all of this is in
  18. borlnd c++ 3.1).
  19. problem is free() doesn't free any of the memory. fter a few rounds (of
  20. creating a few lists) i just ruun out of memory (malloc return a NULL).
  21. i check the free memory with coreleft() and it's the same before and
  22. after the call(s) to free(). i tried a simple program which allocates
  23. memory using mlloc and then frees it using free() and the memmory was
  24. freed (it showed in coreleft()) although i don't think it should have
  25. been returned to the system, only to the free list but that doesnn't
  26. realy matter.
  27.  
  28. How do i REALY fre the memory so i can use it again?
  29.  
  30. TIA,
  31. limbo.
  32.